<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>人流量监管云平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/static/jquery-easyui-1.7.0/themes/default/easyui.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/jquery-easyui-1.7.0/themes/icon.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/jquery-easyui-1.7.0/demo/demo.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/wu.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/icon.css}"/>
    <script type="text/javascript" th:src="@{/static/jquery-easyui-1.7.0/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/jquery-easyui-1.7.0/jquery.easyui.min.js}"></script>
</head>
<body>
<img id="cameraPhoto" src="
"/>

</body>
<script type="text/javascript">
    getCameraPhoto()

    setInterval("getCameraPhoto()", 50) //每隔0.1s更新一次

    function getCameraPhoto() {
        $.ajax({
            type: 'post',
            url: '/CameraPeople/CameraPhoto',
            async: false,
            data: {
                'camera_id': 1,
                'top_num': 1
            },
            success: function (data) {
                src = 'data:image/png;base64,' + data[0].image
                $('#cameraPhoto').attr('src', src)
            },
            error: function () {
                alert("error");
            }
        });
    }
</script>
</html>